package com.njthird.busi.service.impl;

import java.util.List;
import com.njthird.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.njthird.busi.mapper.BusiStockacctsMapper;
import com.njthird.busi.domain.BusiStockaccts;
import com.njthird.busi.service.IBusiStockacctsService;

/**
 * 券商账户管理Service业务层处理
 * 
 * @author njthird
 * @date 2020-08-11
 */
@Service
public class BusiStockacctsServiceImpl implements IBusiStockacctsService 
{
    @Autowired
    private BusiStockacctsMapper busiStockacctsMapper;

    /**
     * 查询券商账户管理
     * 
     * @param id 券商账户管理ID
     * @return 券商账户管理
     */
    @Override
    public BusiStockaccts selectBusiStockacctsById(String id)
    {
        return busiStockacctsMapper.selectBusiStockacctsById(id);
    }

    /**
     * 查询券商账户管理列表
     * 
     * @param busiStockaccts 券商账户管理
     * @return 券商账户管理
     */
    @Override
    public List<BusiStockaccts> selectBusiStockacctsList(BusiStockaccts busiStockaccts)
    {
        return busiStockacctsMapper.selectBusiStockacctsList(busiStockaccts);
    }

    /**
     * 新增券商账户管理
     * 
     * @param busiStockaccts 券商账户管理
     * @return 结果
     */
    @Override
    public int insertBusiStockaccts(BusiStockaccts busiStockaccts)
    {
        busiStockaccts.setCreateTime(DateUtils.getNowDate());
        return busiStockacctsMapper.insertBusiStockaccts(busiStockaccts);
    }

    /**
     * 修改券商账户管理
     * 
     * @param busiStockaccts 券商账户管理
     * @return 结果
     */
    @Override
    public int updateBusiStockaccts(BusiStockaccts busiStockaccts)
    {
        busiStockaccts.setUpdateTime(DateUtils.getNowDate());
        return busiStockacctsMapper.updateBusiStockaccts(busiStockaccts);
    }

    /**
     * 批量删除券商账户管理
     * 
     * @param ids 需要删除的券商账户管理ID
     * @return 结果
     */
    @Override
    public int deleteBusiStockacctsByIds(String[] ids)
    {
        return busiStockacctsMapper.deleteBusiStockacctsByIds(ids);
    }

    /**
     * 删除券商账户管理信息
     * 
     * @param id 券商账户管理ID
     * @return 结果
     */
    @Override
    public int deleteBusiStockacctsById(String id)
    {
        return busiStockacctsMapper.deleteBusiStockacctsById(id);
    }
}
